/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-11-25 09:28:33
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-25 16:47:52
 */
import request from '@/utils/request'
import {SysPostMenuDomain} from '@/type.d/system/postMenu';

// 查询岗位与菜单关系信息列表
export function listPostMenu(query: SysPostMenuDomain) {
  return request('/system/postmenu/list',{
    method: 'get',
    params: query
  })
}

// 查询岗位与菜单关系信息详细
export function getPostMenu(postMenuId: string) {
  return request('/system/postmenu/' + postMenuId,{
    method: 'get'
  })
}

// 新增岗位与菜单关系信息
export function addPostMenu(data: SysPostMenuDomain[]) {
  return request('/system/postmenu',{
    method: 'post',
    data: data
  })
}

// 修改岗位与菜单关系信息
export function updatePostMenu(data: SysPostMenuDomain) {
  return request('/system/postmenu',{
    method: 'put',
    data: data
  })
}

// 删除岗位与菜单关系信息
export function delPostMenuByPostId(postId: string) {
  return request('/system/postmenu/postId/' + postId,{
    method: 'delete'
  })
}
